<template>
  <div ref="chartBox" style="height: 500px"></div>
</template>

<script>
import * as echarts from 'echarts'

export default {
  mounted() {
    const myChart = echarts.init(this.$refs.chartBox)
    // 绘制图表
    myChart.setOption({
      title: {
        text: '绩效指数'
      },
      legend: {
        data: ['a', 'b']
      },
      radar: {
        // shape: 'circle',
        indicator: [{ name: '考勤' }, { name: '积极性' }, { name: '帮助同事' }, { name: '自主学习' }, { name: '正确率' }]
      },
      series: [
        {
          name: 'Budget vs spending',
          type: 'radar',
          data: [
            {
              value: [4200, 3000, 20000, 35000, 50000, 18000],
              name: 'a'
            },
            {
              value: [5000, 14000, 28000, 26000, 42000, 21000],
              name: 'b'
            }
          ]
        }
      ]
    })
  }
}
</script>
